/*
'===============================================================================
'  .CategoryEntity
'===============================================================================
*/

using System;
using System.Collections.Generic;

namespace WB.Entity
{
	public class CategoryEntity
	{
		/// <summary>
		/// Class Category is generation
		/// </summary>
		
		public CategoryEntity()
		{
			// Nothing for now.
		}
		
		private const string TableName = "Category";
		
		
		private const string _IdProperty = "@Name:Id@DataType:uniqueidentifier@IsKey:True@Length:0";
		private bool _IdIsDirty = false;
        private Guid _IdValue;
        public Guid Id
        {
            get { return _IdValue; }
            set
            {
                _IdValue = value;
                _IdIsDirty = true;
            }
        }
		
		private const string _IntIdProperty = "@Name:IntId@DataType:int@IsKey:False@Length:0";
		private bool _IntIdIsDirty = false;
        private int _IntIdValue;
        public int IntId
        {
            get { return _IntIdValue; }
            set
            {
                _IntIdValue = value;
                _IntIdIsDirty = true;
            }
        }
		
		private const string _CatCodeProperty = "@Name:CatCode@DataType:varchar(10)@IsKey:False@Length:10";
		private bool _CatCodeIsDirty = false;
        private string _CatCodeValue;
        public string CatCode
        {
            get { return _CatCodeValue; }
            set
            {
                _CatCodeValue = value;
                _CatCodeIsDirty = true;
            }
        }
		
		private const string _CatNameProperty = "@Name:CatName@DataType:nvarchar(128)@IsKey:False@Length:128";
		private bool _CatNameIsDirty = false;
        private string _CatNameValue;
        public string CatName
        {
            get { return _CatNameValue; }
            set
            {
                _CatNameValue = value;
                _CatNameIsDirty = true;
            }
        }
		
		private const string _ParentCodeProperty = "@Name:ParentCode@DataType:varchar(10)@IsKey:False@Length:10";
		private bool _ParentCodeIsDirty = false;
        private string _ParentCodeValue;
        public string ParentCode
        {
            get { return _ParentCodeValue; }
            set
            {
                _ParentCodeValue = value;
                _ParentCodeIsDirty = true;
            }
        }
		
		private const string _ParentIdProperty = "@Name:ParentId@DataType:uniqueidentifier@IsKey:False@Length:0";
		private bool _ParentIdIsDirty = false;
        private Guid _ParentIdValue;
        public Guid ParentId
        {
            get { return _ParentIdValue; }
            set
            {
                _ParentIdValue = value;
                _ParentIdIsDirty = true;
            }
        }
		
		private const string _OrderNoProperty = "@Name:OrderNo@DataType:int@IsKey:False@Length:0";
		private bool _OrderNoIsDirty = false;
        private int _OrderNoValue;
        public int OrderNo
        {
            get { return _OrderNoValue; }
            set
            {
                _OrderNoValue = value;
                _OrderNoIsDirty = true;
            }
        }
		
		private const string _CreatedByProperty = "@Name:CreatedBy@DataType:varchar(50)@IsKey:False@Length:50";
		private bool _CreatedByIsDirty = false;
        private string _CreatedByValue;
        public string CreatedBy
        {
            get { return _CreatedByValue; }
            set
            {
                _CreatedByValue = value;
                _CreatedByIsDirty = true;
            }
        }
		
		private const string _CreatedDateProperty = "@Name:CreatedDate@DataType:datetime@IsKey:False@Length:0";
		private bool _CreatedDateIsDirty = false;
        private DateTime _CreatedDateValue;
        public DateTime CreatedDate
        {
            get { return _CreatedDateValue; }
            set
            {
                _CreatedDateValue = value;
                _CreatedDateIsDirty = true;
            }
        }
		
		private const string _UpdatedByProperty = "@Name:UpdatedBy@DataType:varchar(50)@IsKey:False@Length:50";
		private bool _UpdatedByIsDirty = false;
        private string _UpdatedByValue;
        public string UpdatedBy
        {
            get { return _UpdatedByValue; }
            set
            {
                _UpdatedByValue = value;
                _UpdatedByIsDirty = true;
            }
        }
		
		private const string _UpdatedDateProperty = "@Name:UpdatedDate@DataType:datetime@IsKey:False@Length:0";
		private bool _UpdatedDateIsDirty = false;
        private DateTime _UpdatedDateValue;
        public DateTime UpdatedDate
        {
            get { return _UpdatedDateValue; }
            set
            {
                _UpdatedDateValue = value;
                _UpdatedDateIsDirty = true;
            }
        }
		
		private const string _IsDeletedProperty = "@Name:IsDeleted@DataType:bit@IsKey:False@Length:0";
		private bool _IsDeletedIsDirty = false;
        private bool _IsDeletedValue;
        public bool IsDeleted
        {
            get { return _IsDeletedValue; }
            set
            {
                _IsDeletedValue = value;
                _IsDeletedIsDirty = true;
            }
        }
		
		
		public void ResetDirty()
        {
			_IdIsDirty = false;
			_IntIdIsDirty = false;
			_CatCodeIsDirty = false;
			_CatNameIsDirty = false;
			_ParentCodeIsDirty = false;
			_ParentIdIsDirty = false;
			_OrderNoIsDirty = false;
			_CreatedByIsDirty = false;
			_CreatedDateIsDirty = false;
			_UpdatedByIsDirty = false;
			_UpdatedDateIsDirty = false;
			_IsDeletedIsDirty = false;
		
		}
	}
}
